# Contributor: Natanael Copa <ncopa@alpinelinux.org>
# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
pkgname=perl-net-ssleay
_pkgreal=Net-SSLeay
pkgver=1.94
pkgrel=0
pkgdesc="Perl extension for using OpenSSL"
url="https://metacpan.org/release/Net-SSLeay"
arch="all"
license="Artistic-2.0"
depends="perl"
makedepends="perl-dev openssl-dev>3 zlib-dev"
checkdepends="perl-test-exception perl-test-warn perl-test-nowarnings"
subpackages="$pkgname-doc"
source="https://cpan.metacpan.org/authors/id/C/CH/CHRISN/Net-SSLeay-$pkgver.tar.gz"
builddir="$srcdir/$_pkgreal-$pkgver"

build() {
	PERL_MM_USE_DEFAULT=1 perl Makefile.PL INSTALLDIRS=vendor
	make
}

check() {
	make test
}

package() {
	make DESTDIR="$pkgdir" install

	# creates file collision among perl modules
	find "$pkgdir" \( -name perllocal.pod -o -name .packlist \) -delete
}

sha512sums="
f1461667269f3da56ff7e1724b5511b95c34582250f8336e9f93d30f3b30d4a5360eb27622b9730bba11df75e00d717c7f0cea2120d20206723db136a8509375  Net-SSLeay-1.94.tar.gz
"
